import request from '@/utils/request'

// 查询模具变动列表
export function listMoldChange(query) {
  return request({
    url: '/device/moldChange/list',
    method: 'get',
    params: query
  })
}

// 查询模具变动详细
export function getMoldChange(moldId) {
  return request({
    url: '/device/moldChange/' + moldId,
    method: 'get'
  })
}

// 新增模具变动
export function addMoldChange(data) {
  return request({
    url: '/device/moldChange',
    method: 'post',
    data: data
  })
}

// 修改模具变动
export function updateMoldChange(data) {
  return request({
    url: '/device/moldChange',
    method: 'put',
    data: data
  })
}

// 确认模具
export function confirmMoldChange(data) {
  return request({
    url: '/device/moldChange/confirm',
    method: 'put',
    data: data
  })
}

// 审核模具
export function processMoldChange(data) {
  return request({
    url: '/device/moldChange/process',
    method: 'put',
    data: data
  })
}

// 批准模具
export function approvalMoldChange(data) {
  return request({
    url: '/device/moldChange/approval',
    method: 'put',
    data: data
  })
}

// 打印单据结案
export function printMoldChange(data) {
  return request({
    url: '/device/moldChange/print',
    method: 'put',
    data: data
  })
}

// 打印单据结案
export function revokeMoldChange(data) {
  return request({
    url: '/device/moldChange/revoke',
    method: 'put',
    data: data
  })
}

// 模具吊摸拍照上传
export function uploadMoldChange(data) {
  return request({
    url: '/device/moldChange/upload',
    method: 'post',
    data: data
  })
}

// 删除模具变动
export function delMoldChange(moldId) {
  return request({
    url: '/device/moldChange/' + moldId,
    method: 'delete'
  })
}

// 导出模具变动
export function exportMoldChange(query) {
  return request({
    url: '/device/moldChange/export',
    method: 'get',
    params: query
  })
}
